<?php
// $Id$

/**
 * @file
 *
 * Available variables:
 * - $header
 * - $pager
 * - $players
 * - $inactive_filter
 *
 * Each $player object in $players contains:
 * - $player->name
 * - $player->link
 * - $player->rankName
 * - $player->zebra
 */
?>
<table class="sticky-enabled" id="guild-roster-table">
  <thead>
    <tr><?php print $header; ?></tr>
  </thead>
  <tbody>
<?php if (!empty($players)): ?>
  <?php foreach ($players as $player): ?>
    <tr class="<?php print $player->zebra; ?>">
      <td class="player-name">
      <?php if (isset($player->link)): ?>
        <a href="<?php print $player->link; ?>"><?php print $player->name; ?></a>
      <?php else: ?>
        <?php print $player->name; ?>
      <?php endif; ?>
      </td>
      <td class="player-rank"><?php print $player->rankName; ?></td>
    </tr>
  <?php endforeach; ?>
<?php else: ?>
    <tr class="odd">
      <td align="center" colspan="2"><?php print t('No guild members found.'); ?></td>
    </tr>
<?php endif; ?>
  </tbody>
</table>
<?php if ($inactive_filter): ?>
<div id="guild-roster-table-footnote"><?php print t('Inactive members are not displayed.'); ?></div>
<?php endif; ?>
<?php print $pager; ?>
